package com.example.case03_16110100424;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
    private Button btn_login;
    private EditText uname,pword;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn_login=findViewById(R.id.btn_login);
        uname=findViewById(R.id.et_username);
                pword=findViewById(R.id.et_password);
                btn_login.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v)  {

                        Intent intent = new Intent(MainActivity.this,Welcome2Activity.class);
                        intent.putExtra("username",uname.getText().toString());
                        intent.putExtra("password",pword.getText().toString());
                         startActivity(intent);
                    }



                });

    }
}
